package cn.achao.csr.api;


import cn.achao.csr.api.factory.SysUserFallbackFactory;
import cn.achao.csr.api.model.dto.OperaAddDTO;
import cn.achao.csr.base.constant.SecurityConstants;
import cn.achao.csr.base.resp.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * @Author: achao
 **/
@FeignClient(contextId = "csrSysOperationLogContextId", path = "/log", value = "csr-system", fallbackFactory = SysUserFallbackFactory.class)
public interface SysOperationLogApi {

    @PostMapping("/add")
    R<?> add(@RequestBody @Validated OperaAddDTO req, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

}
